package com.bdqn.pojo;


import java.io.Serializable;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 系统角色实体类
 */
public class SysRole implements Serializable {

    private static final long serialVersionUID = 42L;

    private Long id;
    private String code;
    private String roleName;
    private Long createdUserId;
    private Date createdTime;
    private Long updatedUserId;
    private String updatedTime;

    @Override
    public String toString() {
        return "SysRole{" +
                "id=" + id +
                ", code='" + code + '\'' +
                ", roleName='" + roleName + '\'' +
                ", createdUserId=" + createdUserId +
                ", createdTime='" + createdTime + '\'' +
                ", updatedUserId=" + updatedUserId +
                ", updatedTime='" + updatedTime + '\'' +
                '}';
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public Long getCreatedUserId() {
        return createdUserId;
    }

    public void setCreatedUserId(Long createdUserId) {
        this.createdUserId = createdUserId;
    }

    public Date getCreatedTime() {

//        String datetimeString =  createdTime;  // 这是从 MySQL 获取的 DATETIME 格式的字符串
//        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");  // 对应 MySQL DATETIME 的格式
//        try {
//            Date date = sdf.parse(datetimeString);
//            System.out.println("转换后的 Date 对象: " + date);
//        } catch (ParseException e) {
//            e.printStackTrace();
//        }
        return createdTime;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public Long getUpdatedUserId() {
        return updatedUserId;
    }

    public void setUpdatedUserId(Long updatedUserId) {
        this.updatedUserId = updatedUserId;
    }

    public String getUpdatedTime() {
        return updatedTime;
    }

    public void setUpdatedTime(String updatedTime) {
        this.updatedTime = updatedTime;
    }

}
